package moon.traverse;

import moon.core.ObjectMoon;
import moon.core.classdef.AttDec;
import moon.core.classdef.ClassDef;
import moon.core.classdef.ClassType;
import moon.core.classdef.MethDec;
import moon.core.classdef.NameSpace;
import moon.core.expression.Expr;
import moon.core.inheritance.InheritanceClause;
import moon.core.instruction.Instr;

/**
 * Visitor of the graph.
 * 
 * @author Raul Marticorena 
 * 
 */
public interface Visitor {
	
	/**
	 * Utility method to begin the process.
	 *
	 */
	void begin();
	
	/**
	 * Visits a namespace.
	 * 
	 * @param ns namespace definition
	 */
	void visit(NameSpace ns);
	
	/**
	 * Visits a class.
	 * 
	 * @param cd class definition
	 */
	void visit(ClassDef cd);
	
	/**
	 * Visits a class type.
	 * 
	 * @param ct type definition
	 */
	void visit(ClassType ct);

	/**
	 * Visits a method.
	 * 
	 * @param md method declaration
	 */
	void visit(MethDec md);

	/**
	 * Visits an attribute.
	 * 
	 * @param ad attribute declaration
	 */
	void visit(AttDec ad);

	/**
	 * Visits an inheritance clause.
	 * 
	 * @param ic inheritance clause
	 */
	void visit(InheritanceClause ic);
	
	/**
	 * Visits an expression.
	 * 
	 * @param expr expression
	 * 
	 */
	void visit(Expr expr);
	
	/**
	 * Visits an instruction.
	 * 
	 * @param expr expression
	 * 
	 */
	void visit(Instr instr);
	
	/**
	 * Visits an object moon.
	 * 
	 * @param expr expression
	 * 
	 */
	void visit(ObjectMoon objectMoon);
	
	/**
	 * Utility method to end the process.
	 *
	 */
	void end();
}
